Direct fire refers to the launching of a projectile directly at a target on a relatively flat trajectory. The firing weapon must have a sighting device and an unobstructed line of sight to the target, which means no objects or friendly units can be between it and the target. A weapon engaged in direct fire exposes itself to return fire from the target.
By contrast, indirect fire refers to firing projectile on a high ballistic trajectory, and does not need a direct line of sight to the target because the shots are normally directed by a forward observer. As such, indirect fire weapons can shoot over obstacles or friendly units and the weapons be can be concealed from direct return fire.
Example of direct fire weapons include handguns, rifles, machine guns, anti-tank guns, and anti-tank rockets. Howitzers and mortars are examples of indirect fire weapons. Large caliber machine guns, like the .50 caliber, can be used in both roles. In the pre-gun age, bows could be used in either role.
For unguided projectiles, direct fire is generally more accurate and of higher velocity and thus is better for penetrating hardened targets and for quickly destroying small, discrete targets. As a general rule, direct fire - especially that from foot soldiers - is required to dislodge enemy units from an area; indirect fire can repress a target area as soldiers and armored vehicles close in on it, but indirect fire cannot capture a target on its own.